using System.Threading.Tasks;
using DailyPoetryX.AzureStorage.Models;

namespace DailyPoetryX.AzureStorage.Services {
    /// <summary>
    /// Token缓存。
    /// </summary>
    public interface ITokenCache {
        /// <summary>
        /// 获得token缓存项。
        /// </summary>
        /// <param name="token">Token。</param>
        Task<string> GetAsync(string token);

        /// <summary>
        /// 设置token的缓存。
        /// </summary>
        /// <param name="token">Token。</param>
        /// <param name="name">用户名。</param>
        Task SetAsync(string token, string name);
    }
}